﻿using Flow.Manage.Contracts;
using Framework.Models.Entities;
using Microsoft.AspNetCore.Mvc; 

namespace ApprovalFlow.Api.Controllers
{ 
    [ApiController]
    public class BannerController : ControllerBase
    {
        private readonly ILogger<BannerController> _logger;

        private readonly IBannerContract _bannerContract;
         
        public BannerController(ILogger<BannerController> logger, IBannerContract bannerContract)
        {
            _logger = logger;
            _bannerContract = bannerContract;
        }
        /// <summary>
        /// 获取Banner图
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [Route("/banner/GetBanner")]
        public IActionResult GetAllBanner()
        {
            return Ok(_bannerContract.GetAllBanner());
        }
        [HttpGet]
        [Route("/user/GetUser")]
        public async Task<TData<List<Biz_User>>> GetUser()
        {
            return await _bannerContract.GetAllUser();
        }
        
    }
}
